Skip to content

Complete remaining button and rail config knobs - #29

Merged
blackopsrepl merged 1 commit into
mainfrom
issue-10-api-knobs
Mar 21, 2026
Merged

Complete remaining button and rail config knobs#29
blackopsrepl merged 1 commit into
mainfrom
issue-10-api-knobs

Conversation

@blackopsrepl

Copy link
Copy Markdown
Contributor

Closes #10.

Summary

  • make iconOnly buttons actually icon-only while keeping an accessible label
  • implement badges support for rail resource cards instead of silently ignoring it
  • document the completed rail badge and icon-only button behavior in README and WIREFRAME

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3ed9738a69

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread js-src/13-rail.js Outdated
Comment on lines +59 to +60
if (config.badges && config.badges.length) {
config.badges.forEach(function (entry) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guard badges against scalar strings before iterating

SF.rail.createCard() now assumes any truthy config.badges.length also supports forEach(). That breaks a single-string badge (badges: 'TEMPRA'): strings have a length, so this branch runs, but forEach is undefined and the card throws before rendering. Because type is already a scalar string and the new API docs describe badges as strings or styled objects, this is an easy input shape for callers to hit.

Useful? React with 👍 / 👎.

@blackopsrepl
blackopsrepl merged commit 373cf06 into main Mar 21, 2026
1 check passed
@blackopsrepl
blackopsrepl deleted the issue-10-api-knobs branch May 15, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove or complete misleading API knobs that do not currently do anything

1 participant